/**
 * Generate code from /{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/mapping/{{entities}}InheritMapping.java.hbs
 */
package cn.ibizlab.core.ad.mapping;

import org.mapstruct.*;
import cn.ibizlab.core.ad.domain.SysPerson;
import cn.ibizlab.core.ad.domain.SysCommonName;
import java.util.List;

/**
 * 人员继承映射[SysPerson]
 *
 * @author generator
 */
@Mapper(componentModel = "spring", uses = {})
public interface SysPersonInheritMapping {

    /**
     * 转换SysCommonName
     * 
     * @param sysPerson
     * @return
     */
    @Mappings({
            @Mapping(target ="focusNull",ignore = true),
            @Mapping(source ="id",target = "id"),
            @Mapping(source ="organizationId",target = "organizationId"),
            @Mapping(source ="displayName",target = "cn"),
            @Mapping(source ="dn",target = "dn"),
            @Mapping(source ="dc",target = "dc"),
            @Mapping(source ="description",target = "description"),
            @Mapping(source ="enabled",target = "enabled"),
    })
    SysCommonName toSysCommonName(SysPerson sysPerson);

    /**
     * 转换SysCommonName
     * 
     * @param sysCommonName
     * @return
     */
    @Mappings({
            @Mapping(target ="focusNull",ignore = true),
            @Mapping(source ="id",target = "id"),
            @Mapping(source ="organizationId",target = "organizationId"),
            @Mapping(source ="cn",target = "displayName"),
            @Mapping(source ="dn",target = "dn"),
            @Mapping(source ="dc",target = "dc"),
            @Mapping(source ="description",target = "description"),
            @Mapping(source ="enabled",target = "enabled"),
    })
    SysPerson toSysPerson(SysCommonName sysCommonName);

    /**
     * List SysPerson 对象转换
     *
     * @param list
     * @return
     */
    List<SysCommonName> toSysCommonName(List<SysPerson> list);

    /**
     * List SysCommonName 对象转换
     *
     * @param list
     * @return
     */
    List<SysPerson> toSysPerson(List<SysCommonName> list);

}
